<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.40/vue.global.js"></script>
</head>
<body>
    <div id="app">
        <button @click="consst++">{{consst}}</button>
        <home>
            <template v-slot:[type]>asd</template>
            <template v-slot:default>asd</template>
        </home>
    </div>
</body>
<template id="home">
    <div><slot name="a">home</slot></div>
    <div><slot name="b">work</slot></div>
    <div><slot>work</slot></div>
</template>
</html>
<script>
    const app = Vue.createApp({
        data() {
            return {
                consst:1,
            }
        },
        computed:{
            type(){
                return this.consst % 2==0?'a':'b'
            }
        },
        components:{
            home:{
                template:'#home'
            }
        }
    })
    app.mount('#app')
</script>